package Text1;

/*
 *@Student 张策
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        Cat cat = new Cat();
        cat.start();//启动程序
        System.out.println("主线程"+Thread.currentThread().getName());
        for (int i = 0; i < 90; i++) {
            System.out.println("主线程"+i);
            Thread.sleep(1000);
        }
    }
}
class Cat extends Thread{
    int time=0;
    @Override
    public void run() {
        while (true) {
            System.out.println("zc"+(++time));
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            if(time>90){
               break;
            }
        }
    }
}
